package cn.nfwx.tv.fragment.tv;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import cn.nfwx.tv.R;
import cn.nfwx.tv.adapter.HotVideoAdapter;
import cn.nfwx.tv.base.BaseFragment;

/**
 * create by zb.liu by 2017/11/9
 */
public class HotVideoFragment extends BaseFragment {

     private RecyclerView hot_video_recyclerView;
     private HotVideoAdapter adapter;

    @Override
    public View initView() {
        View view=View.inflate(mContext,R.layout.fragment_hot_video,null);
        hot_video_recyclerView=view.findViewById(R.id.hot_video_recyclerView);

        return view;
    }

    @Override
    public void initData() {
        super.initData();
        GridLayoutManager manager=new GridLayoutManager(getActivity(),3);
        hot_video_recyclerView.setLayoutManager(manager);
        adapter=new HotVideoAdapter();
        hot_video_recyclerView.setAdapter(adapter);
    }
}
